<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>笑话展示</title>
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
</head>
<body>
<form >
    <input type="text" name="keyword" ><input type="submit" value="内容搜索">
</form>
<table class="table">
    <tr>
        <th>ID</th>
        <th>内容</th>
        <th>hashId</th>
        <th>unixtime</th>
        <th>updatetime</th>
        <th>create_time</th>
        <th>软删除</th>
    </tr>
    {foreach $data as $k=>$v}
    <tr>
        <td>{$v.id}</td>
        <td>{$v.content}</td>
        <td>{$v.hashId}</td>
        <td>{$v.unixtime}</td>
        <td>{$v.updatetime}</td>
        <td>{$v.create_time}</td>
        <td>
            <button id="{$v.id}" class="btn-danger one">软删除</button>
        </td>
    </tr>
    {/foreach}
</table>
{$data|raw}
</body>
<script src="/static/js/jquery-3.1.1.min.js"></script>
<script>
    $(function () {
              $('.one').click(function () {
                    var  id=$(this).attr('id');
                  // console.log(id);
                  $.post(
                      'del',
                      {id:id},
                      function (data) {
                          console.log(data);
                      }
                  )



              })
    })
</script>
</html>